package com.avetti.commerce.domainmodel;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** @author Hibernate CodeGenerator */
public class Itemattrib implements Serializable {

   
	private static final long serialVersionUID = 1L;

	/** identifier field */
    private Long id;

    /** nullable persistent field */
    private Long itemid;

    /** nullable persistent field */
    private Long attributeid;

    /** nullable persistent field */
    private int position=1;

    /** persistent field */
    private short invt=0;

    /** persistent field */
    private short rollimg=0;

    /** persistent field */
    private short upd=0;

    /** persistent field */
    private short dcont=0;

    /** full constructor */
    public Itemattrib(Long id, Long itemid, Long attributeid, int position, short invt, short rollimg, short upd, short dcont) {
        this.id = id;
        this.itemid = itemid;
        this.attributeid = attributeid;
        this.position = position;
        this.invt = invt;
        this.rollimg = rollimg;
        this.upd = upd;
        this.dcont = dcont;
    }

    /** default constructor */
    public Itemattrib() {
    }

    /** minimal constructor */
    public Itemattrib(Long id, short invt, short rollimg, short upd, short dcont) {
        this.id = id;
        this.invt = invt;
        this.rollimg = rollimg;
        this.upd = upd;
        this.dcont = dcont;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getItemid() {
        return this.itemid;
    }

    public void setItemid(Long itemid) {
        this.itemid = itemid;
    }

    public Long getAttributeid() {
        return this.attributeid;
    }

    public void setAttributeid(Long attributeid) {
        this.attributeid = attributeid;
    }

    public int getPosition() {
        return this.position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public short getInvt() {
        return this.invt;
    }

    public void setInvt(short invt) {
        this.invt = invt;
    }

    public short getRollimg() {
        return this.rollimg;
    }

    public void setRollimg(short rollimg) {
        this.rollimg = rollimg;
    }

    public short getUpd() {
        return this.upd;
    }

    public void setUpd(short upd) {
        this.upd = upd;
    }

    public short getDcont() {
        return this.dcont;
    }

    public void setDcont(short dcont) {
        this.dcont = dcont;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("id", getId())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof Itemattrib) ) return false;
        Itemattrib castOther = (Itemattrib) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getId())
            .toHashCode();
    }

}
